﻿using System;
using PSE.Deployment.SetupBase.Commands;

namespace Sinacor.Deployment.Setup.Console
{
    public class Starter
    {
        [STAThread]
        public static int Main(string[] args)
        {
            if (args.Length == 0)
            {
                Messages.NoArgsSyntaxError();
                return -1;
            }

            ICommand command = CommandFactory.Instance(args[0].ToLower());

            if (command != null)
            {
                return command.Execute(args);
            }

            //System.Console.ReadLine();

            return 0;
        }
    }
}
